import java.sql.SQLOutput;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: Lyn
 * Date: 2025-01-20
 * Time: 10:34
 */
/*class Dog {
    public void bark() {
        System.out.println("woof");
    }
}
class Hound extends Dog{
    public void sniff(){
        System.out.println("sniff");
    }
    @Override
    public void bark() {
        System.out.println("bowl");
    }
}*/
     /* public void bark() {
        System.out.println("woof");
    }
    public void bark(int a){
        for (int i = 0; i < a; i++) {
            System.out.println("woof");
        }*//*
    }*/
     /*public void sniff(){
        System.out.println("sniff");
    }
    @Override
    public void bark() {
        System.out.println("bowl");
    }*/
    /*class TextDog{
    //方法传参：形参为父类型引用，可以接受任意子类对象
    public static void eatFood(Dog a){
        a.eat();
    }
    public static Dog buyDog(String var){
        if("狗".equals(var)){
            return new Dog("狗狗",11);
        }
        else return null;
    }
}*/
/*
class Dog {
    String name;
    int age;
    public Dog(String name,int age){
        this.name = name;
        this.age = age;
    }
    public void eat(){
        System.out.println(name+"吃饭");
    }
}

class Hound extends Dog{
    public Hound(String name,int age){
        super(name,age);
    }
}
public class text {
    public static void main(String[] args) {
        Dog dog = new Hound("lili",10);
        Hound hound = new Hound("dark",19);
        System.out.println(dog.name+dog.age);
        System.out.println(hound.name+hound.age);
        dog.eat();
    }
}
*/
